﻿<?php 
class Form_PDetailsForm extends Zend_Form
{
	public function init()
	{
	
	
	}
	
	// tạo form với category id (cat_id);
	public function setForm($cat_id)
	{
		$catdesModel = new Model_Catdes();
		$catdesArray = $catdesModel->getCatdes($cat_id);
		for($i=0;$i<count($catdesArray); $i++){
			$this->addElement('text',''.$catdesArray[$i]['catdes_id'].'',array(
				'required'   => true,
				'label'      => $catdesArray[$i]['catdes_ten']. ':',
			));
		}
		$this->addElement('submit','Tạo');	 
	}	
}